ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods






OPERATOR:  And

And

The And operator is used to perform a logical conjunction on two expressions. The expressions must be of Boolean subtype (True or False) or Null. The order of the expressions in the comparison is not important.

Code:
<% =True And True %>
<% =True And False %>
<% =False And True %>
<% =False And False %>

<% =True And Null %>
<% =Null And True %>
<% =False And Null %>
<% =Null And False %>
<% =Null And Null %>

Output:
True
False
False
False

(Null output)
(Null output)
False
False
(Null output)

Code:
<% anyexpression = True %>
<% someexpression = False %>
<% =anyexpression And someexpression %>

Output:
False